﻿using System;
using System.Collections.Generic;

namespace AMS.DataAccess.Sys.BO
{
    [DBTable("TS_Module")]
    public class ModuleInfo
    {
        #region Database Column Fields
        [DBPrimaryKeyColumn("AID", true)]
        public int AID { get; set; }

        [DBColumn("ModuleName")]
        public string ModuleName { get; set; }

        [DBEnumColumn("ModuleType", typeof(ModuleType))]
        public ModuleType ModuleType { get; set; }

        [DBColumn("ParentModuleID", 0)]
        public int ParentModuleID { get; set; }

        [DBColumn("isReadOnly", false, true)]
        public bool isReadOnly { get; set; }

        [DBDateTime("CreateDateTime", DateTimeType.DateTime, false, true)]
        public DateTime CreateDateTime { get; set; }

        [DBColumn("CreateUserID", false, true)]
        public int CreateUserID { get; set; }

        #endregion

        /// <summary>
        /// The module it contains
        /// </summary>
        public List<ModuleInfo> Modules { get; set; }
        public List<FunctionInfo> Functions { get; set; }
    }
}
